GtkListStore *_font_model;
GtkListStore *_face_model;
- gboolean ignore_update;
+ gboolean ignore_size;
+ gboolean ignore_face;
+ gboolean ignore_font;
#endif
};
priv->_font_model = NULL;
priv->_face_model = NULL;
- priv->ignore_update = FALSE;
+ priv->ignore_size = FALSE;
+ priv->ignore_face = FALSE;
+ priv->ignore_font = FALSE;
#endif /* GTK_DISABLE_DEPRECATED */
/* Getting the default size */
tv = gtk_bin_get_child (GTK_BIN (priv->font_list));
+ priv->ignore_font = TRUE;
gtk_tree_view_set_cursor (GTK_TREE_VIEW (tv), path, NULL, FALSE);
gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (tv), path, NULL, FALSE, 0.0, 0.0);
-
/* Free resources */
gtk_tree_path_free (path);
g_free (family_name);
int i, n_faces;
pango_font_family_list_faces (priv->family, &faces, &n_faces);
- pango_font_family_get_name (priv->family);
gtk_list_store_clear (priv->_face_model);
continue;
tv = gtk_bin_get_child (GTK_BIN (priv->face_list));
-
+ priv->ignore_face = TRUE;
gtk_tree_view_set_cursor (GTK_TREE_VIEW (tv), path, NULL, FALSE);
gtk_tree_path_free (path);
break;
tv = gtk_bin_get_child (GTK_BIN (priv->size_list));
+ priv->ignore_size = TRUE;
gtk_tree_view_set_cursor (GTK_TREE_VIEW (tv), path, NULL, FALSE);
gtk_tree_path_free (path);
{
GtkFontSelection *fontsel = (GtkFontSelection*)data;
+ if (fontsel->priv->ignore_size)
+ {
+ fontsel->priv->ignore_size = FALSE;
+ return;
+ }
+ g_debug ("size");
}
static void
family_list_cursor_changed_cb (GtkTreeView *treeview, gpointer data)
{
GtkFontSelection *fontsel = (GtkFontSelection*)data;
-
+
+
+ if (fontsel->priv->ignore_font)
+ {
+ fontsel->priv->ignore_font = FALSE;
+ return;
+ }
+ g_debug ("family");
}
face_list_cursor_changed_cb (GtkTreeView *treeview, gpointer data)
{
GtkFontSelection *fontsel = (GtkFontSelection*)data;
+
+ if (fontsel->priv->ignore_face)
+ {
+ fontsel->priv->ignore_face = FALSE;
+ return;
+ }
+ g_debug ("face");
}
static void